]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
AppDisplay: fix isTerminal() check for apps without .desktop files
authorSebastian Keller <sebastian-keller@gmx.de>
Sat, 18 Jan 2014 13:38:41 +0000 (14:38 +0100)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 18 Jan 2014 16:36:10 +0000 (11:36 -0500)
If the app has no .desktop file get_app_info() returns null.
This breaks window switching using the dash for those apps.

https://bugzilla.gnome.org/show_bug.cgi?id=722494

js/ui/appDisplay.js

index 154ddaa23351620717336db3ca3c74c6ac6f4484..19ba949ee46a148159459b0b1b84086619b281f2 100644 (file)
@@ -47,7 +47,10 @@ const PAGE_SWITCH_TRESHOLD = 0.2;
 const PAGE_SWITCH_TIME = 0.3;
 
 function _isTerminal(app) {
-    let categories = app.get_app_info().get_categories() || [];
+    let info = app.get_app_info();
+    if (!info)
+        return false;
+    let categories = info.get_categories() || [];
     return categories.indexOf('TerminalEmulator') > -1;
 }